package com.zc.client.http;


import com.zc.client.http.enums.ServiceType;
import com.zc.client.http.enums.SourceType;
import com.zc.client.http.form.AnchorWithDrawFrom;
import com.zc.client.http.form.LoginFrom;
import com.zc.client.http.form.ProgramListForm;
import org.junit.jupiter.api.Test;

/**
 * 幸运币
 *
 * @author wzy
 * @Date 2025/9/5 14:59
 */
public class LuckyCoinClient {
    /**
     * 测试登录
     */
    @Test
    public void testLogin() {
        SendGiftClient sendGiftClient = new SendGiftClient(SourceType.DEV, ServiceType.LELE_DEV, "/user/spaceship/info");
        sendGiftClient.creatPost();
        String session = sendGiftClient.fillSession("18266664444");
        System.out.println(session);
        sendGiftClient.postExecute(new LoginFrom());
    }

    /**
     * 查看幸运币
     * */
    @Test
    public void testLuckyCoin() {
        SendGiftClient sendGiftClient = new SendGiftClient(SourceType.DEV, ServiceType.LELE_DEV, "/live/program/more/luckyCoin");
        sendGiftClient.creatPost();
        sendGiftClient.setSessionId("d42a0580257d4080aada6e4b90c0b847");
        ProgramListForm paraForm = new ProgramListForm();
        paraForm.setProgramId(37720);
        paraForm.setLimit(20);
        paraForm.setOffset(0);
        sendGiftClient.postExecute(paraForm);
    }

    /**
     * 主播兑换幸运币
     */
    @Test
    public void testLuckyCoinAward() {
        SendGiftClient sendGiftClient = new SendGiftClient(SourceType.DEV, ServiceType.LELE_DEV, "/live/program/more/luckyCoinAward");
        sendGiftClient.creatPost();
        sendGiftClient.setSessionId("d42a0580257d4080aada6e4b90c0b847");
        AnchorWithDrawFrom paraForm = new AnchorWithDrawFrom();
        paraForm.setAnchorId(13792871568L);
        paraForm.setMoney(101L);
        paraForm.setProgramId(37720);
        sendGiftClient.postExecute(paraForm);
    }

}
